﻿@model WebUI.Models.Business.UserLogin
@{
    Layout = null;
    ViewBag.Title = "管理员登录";
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>@ViewBag.Title</title>
    <link href="~/Content/themes/metro/easyui.css" rel="stylesheet" />
    <link href="~/Content/themes/icon.css" rel="stylesheet" />
</head>
<body>
    <noscript>
        <div style=" position:absolute; z-index:100000; height:2046px;top:0px;left:0px; width:100%; background:white; text-align:center;">
            <img src="~/images/noscript.gif" alt='抱歉，请开启脚本支持！' />
        </div>
    </noscript>
    <div id='Loading' style="position:fixed;z-index:1000;top:0px;left:0px;width:100%;height:100%;background:white;">
        <div style="position:absolute;margin:auto;left:0;right:0;top:0;bottom:0;width:94px;height:25px;">
            <image style="position:absolute;top:2.5px;" src="~/Content/themes/metro/images/loading.gif" /><span style="margin-left:18px;font-size:12px;">加载中···</span>
        </div>
    </div>
    <div id="dlg" class="easyui-dialog" title="登录" closable="false" draggable="false" style="width:240px;padding:10px">
        @using (Html.BeginForm())
        {
            @Html.AntiForgeryToken()
            <div style="margin-bottom:10px">
                @Html.TextBoxFor(m => m.LoginName, new { @class = "easyui-textbox", style = "width:100%;height:40px;padding:12px", prompt = "用户名", iconCls = "icon-man", iconWidth = 38, required = true })
            </div>
            <div style="margin-bottom:20px">
                @Html.PasswordFor(m => m.LoginPwd, new { @class = "easyui-textbox", style = "width:100%;height:40px;padding:12px", prompt = "密码", iconCls = "icon-lock", iconWidth = 38, required = true })
            </div>
            <div style="margin-bottom:20px">
                @Html.EditorFor(m => m.RememberMe)
                <span>记住我</span>

            </div>
            <div>
                <a href="#" onclick="submitForm();" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:100%;">
                    <span style="font-size:14px;">登录</span>
                </a>
            </div>
        }
    </div>

    <script src="~/Scripts/jquery-1.11.2.min.js"></script>
    <script src="~/Scripts/jquery.easyui.min-1.4.2.js"></script>
    <script src="~/Scripts/locale/easyui-lang-zh_CN.js"></script>
    <script src="~/Scripts/common.js"></script>
    <script>
        $.parser.onComplete = function () {
            $("#Loading").fadeOut("normal", function () {
                $(this).remove();
            });
        }
        function submitForm() {
            $('form').form('submit', {
                onSubmit: function () {
                    var isVerified = $('form').form('validate');
                    if (!isVerified) {
                        $.messager.alert('提示', '请填写用户名和密码');
                        return false;
                    }
                },
                success: function (data) {
                    location.href = '/Admin/System/Index?current=0';
                }
            });
        }
    </script>

</body>
</html>